-- GENERATED SPELL FOR [Syndicate Wizard] --


function spell0_2319(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20815,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2319', 3000, 1)
end

function spell1_2319(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_2319', 0, 1)
end

function spell2_2319(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2319', 9500, 1)
end

function Sorts_2319(pUnit, Event)
local choix_sorts_2319 = math.random(0, 2)
if choix_sorts_2319 == 0 then
pUnit:RegisterEvent('spell0_2319', 1, 1)
end
if choix_sorts_2319 == 1 then
pUnit:RegisterEvent('spell1_2319', 1, 1)
end
if choix_sorts_2319 == 2 then
pUnit:RegisterEvent('spell2_2319', 1, 1)
end
end

function mob2319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2319', math.random(1500, 3000), 1)
end

function mob2319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2319, 1, 'mob2319_Action')
RegisterUnitEvent(2319, 2, 'mob2319_Leave')
RegisterUnitEvent(2319, 3, 'mob2319_Kill')
RegisterUnitEvent(2319, 4, 'mob2319_Die')
